/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ({

/***/ 0:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/14.
	 */
	var Button = __webpack_require__(3);
	var Input = __webpack_require__(4);
	var Checkbox = __webpack_require__(8);
	var SelectDropDown = __webpack_require__(25);
	var FormItem = __webpack_require__(5);
	function hasClass(elem, cls) {
	    elem = elem || {};
	    return new RegExp("\\b" + cls + "\\b").test(elem.className);
	};
	//添加样式
	function addClass(elem, cls) {
	    elem = elem || {};
	    hasClass(elem, cls) || (elem.className += " " + cls);
	    elem.className = elem.className.replace(/^\s|\s$/g, "").replace(/\s+/g, " ");
	    return this;
	};
	//删除样式
	function removeClass(elem, cls) {
	    elem = elem || {};
	    if (hasClass(elem, cls)) {
	        elem.className = elem.className.replace(new RegExp("(\\s|^)" + cls + "(\\s|$)"), "");
	    }
	    return this;
	};
	var Root = React.createClass({displayName: "Root",
	    getInitialState: function () {

	    },
	    componentDidMount: function(){
	        var _this = this;
	        UEventHub.emit("pageLoad","hello world!");
	        _this.refs.borrowResult.style.display = "none";
	        UEventHub.on('showResult',function (bool,result) {
	            if(bool){
	                PageDM.user.setValue(result);
	                _this.refs.borrow.style.display = "none";
	                _this.refs.borrowResult.style.display = "block";
	            }else{
	                _this.refs.borrow.style.display = "block";
	                _this.refs.borrowResult.style.display = "none";
	            }

	        })

	    },
	    getType:function (val) {
	        var li = this.refs.type.childNodes;
	        console.log(li)
	        for(var i = 0; i<li.length;i++){
	            if(val == i){
	                addClass(li[i],"current");
	            }else {
	                removeClass(li[i],"current");
	            }
	        }
	        PageDM.btn.setValue(val);

	    },
	    render: function () {
	        var _this = this;
	        var PageDM = window.PageDM;

	        var options = [
	            {
	                option: "绵阳银行",
	                value:"245"
	            },
	            {
	                option: "中国工商银行",
	                value: "2"
	            },
	            {
	                option: "交通银行",
	                value: "3"
	            },
	            {
	                option: "下拉4",
	                value: "4"
	            },
	            {
	                option: "下拉5",
	                value: "5"
	            }
	        ];
	        UEventHub.on(PageDM.user.dmbind + UI_EVENT_CONST.SET_UDM_VALUE_EVENT, function(v){
	            _this.refs.phoneWrap.innerHTML = v;
	        });
	        return (
	            React.createElement("div", null, 
	                React.createElement("div", {className: "header"}, 
	                    React.createElement("div", {className: "top-bar fc-light"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("span", null, "服务热线：0816-2373017"), 
	                            React.createElement("span", null, "服务时间：工作日 9:00-18:00"), 
	                            React.createElement("span", {className: "nav-right"}, 
	                                React.createElement("a", {href: "登录注册/登录.html"}, "登录"), 
	                                React.createElement("a", {href: "登录注册/注册.html"}, "注册"), 
	                                React.createElement("a", {href: "帮助中心/平台介绍.html"}, "帮助中心"), 
	                                React.createElement("a", {href: "index.html"}, "返回绵阳商业银行")
	                            )
	                        )
	                    ), 
	                    React.createElement("div", {className: "header-nav"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("div", {className: "logo f-left"}, React.createElement("a", {href: "index.html"}, React.createElement("img", {src: "../images/logo.jpg", alt: ""}), " "), React.createElement("a", {href: "index.html"}, React.createElement("img", {src: "../images/logoe.jpg", alt: ""}))), 
	                            React.createElement("div", {className: "nav f-right"}, 
	                                React.createElement("ul", {className: "clearfix"}, 
	                                    React.createElement("li", null, React.createElement("a", {href: "index.html"}, "首页")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "我要投资.html"}, "我要投资")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "我要借款.html", className: "current"}, "我要借款")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "账户中心/我的账户.html"}, "我的账户"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "clear"})
	                        ), 
	                        React.createElement("div", {className: "shadow"})
	                    )
	                ), 
	                React.createElement("div", {ref: "borrow"}, 
	                    React.createElement("div", {className: "form-loan"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("div", {className: "index-title"}, React.createElement("b", null), "我要借款", React.createElement("b", null)), 
	                            React.createElement("div", {className: "tab"}, 
	                                React.createElement("ul", {className: "clearfix", ref: "type"}, 
	                                    React.createElement("li", {className: "col-1 current", onclick: function(){_this.getType(0)}}, "企业贷款"), 
	                                    React.createElement("li", {className: "col-2", onclick: function(){_this.getType(1)}}, "票据")
	                                )
	                            ), 
	                            React.createElement("div", {className: "form"}, 
	                                React.createElement(FormItem, {label: "企业姓名", dmbind: PageDM.companyName.dmbind}, 
	                                    React.createElement(Input, {placeholder: PageDM.companyName.placeholder, dmbind: PageDM.companyName.dmbind})
	                                ), 
	                                React.createElement(FormItem, {label: "联系人姓名", dmbind: PageDM.contacts.dmbind}, 
	                                    React.createElement(Input, {placeholder: PageDM.contacts.placeholder, dmbind: PageDM.contacts.dmbind})
	                                ), 
	                                React.createElement(FormItem, {label: "联系人电话", dmbind: PageDM.contactsPhone.dmbind}, 
	                                    React.createElement(Input, {placeholder: PageDM.contactsPhone.placeholder, dmbind: PageDM.contactsPhone.dmbind})
	                                ), 
	                                React.createElement(FormItem, {label: "开户银行", dmbind: PageDM.banks.dmbind}, 
	                                    React.createElement(SelectDropDown, {options: options, onChange: PageDM.banks.onChange})
	                                ), 
	                                React.createElement(FormItem, {label: "银行账号", dmbind: PageDM.bankNum.dmbind}, 
	                                    React.createElement(Input, {placeholder: "请输入银行账号", placeholder: PageDM.bankNum.placeholder, dmbind: PageDM.bankNum.dmbind})
	                                ), 
	                                React.createElement(FormItem, {label: "发布方式"}, 
	                                    React.createElement("input", {type: "text", placeholder: "委托银行代为发布", className: "ucs-input", disabled: true})
	                                ), 

	                                React.createElement("div", {className: "form-group check"}, 
	                                    React.createElement("label", null, " "), 
	                                    React.createElement(Checkbox, {text: " 我已阅读并同意", checked: PageDM.checkbox.checked, onclick: PageDM.checkbox.onClick}), 
	                                    React.createElement("a", {href: "#", className: "fc-link"}, "《绵阳市商业银行平台服务协议（个人版）》")
	                                ), 

	                                React.createElement("div", {className: "button"}, 
	                                    React.createElement(Button, {value: "立即申请", className: "btn btn-confirm", onclick: PageDM.btn.onClick})
	                                ), 
	                                React.createElement("span", {className: "angle angle-left"}), 
	                                React.createElement("span", {className: "angle angle-right"})
	                            )
	                        )
	                    ), 
	                    React.createElement("div", {className: "index-steps loan"}, 
	                        React.createElement("div", {className: "container"}, 
	                            React.createElement("div", {className: "index-title"}, React.createElement("b", null), "申请流程", React.createElement("b", null)), 
	                            React.createElement("div", {className: "content clearfix"}, 
	                                React.createElement("a", {href: "javascript:;"}, 
	                                    React.createElement("i", {className: "iconfont icon-my"}), "注册/登录"
	                                ), 
	                                React.createElement("a", {href: "javascript:;", className: "arrow"}, React.createElement("i", {className: "iconfont icon-arrow"}), " "), 
	                                React.createElement("a", {href: "javascript:;"}, 
	                                    React.createElement("i", {className: "iconfont icon-locatype"}), "选择融资类型"
	                                ), 
	                                React.createElement("a", {href: "javascript:;", className: "arrow"}, React.createElement("i", {className: "iconfont icon-arrow"}), " "), 
	                                React.createElement("a", {href: "javascript:;"}, 
	                                    React.createElement("i", {className: "iconfont icon-protocol"}), "签署融资协议"
	                                ), 
	                                React.createElement("a", {href: "javascript:;", className: "arrow"}, React.createElement("i", {className: "iconfont icon-arrow"}), " "), 
	                                React.createElement("a", {href: "javascript:;"}, 
	                                    React.createElement("i", {className: "iconfont icon-release"}), "委托银行", React.createElement("br", null), "代为发布"
	                                )
	                            )
	                        )
	                    )
	                ), 
	                React.createElement("div", {ref: "borrowResult", className: "loan-result container"}, 
	                    React.createElement("div", {className: "txt"}, 
	                        React.createElement("p", null, "您好，", React.createElement("span", {ref: "phoneWrap"}), "！"), 
	                        React.createElement("p", null, " "), 
	                        React.createElement("p", null, 
	                            PageDM.user.text
	                        )
	                    ), 
	                    React.createElement("span", {className: "angle angle-top"}), 
	                    React.createElement("span", {className: "angle angle-bottom"})
	                ), 
	                React.createElement("div", {className: "footer"}, 
	                    React.createElement("div", {className: "container"}, 
	                        React.createElement("div", {className: "footer-logo f-left"}, 
	                            React.createElement("p", {className: "logo-foot"}, React.createElement("img", {src: "../images/foot-logo.png", alt: ""})), 
	                            React.createElement("p", {className: "txt"}, "2005－2013 绵阳市商业银行股份有限公司 ", React.createElement("a", {href: "http://www.miitbeian.gov.cn", target: "_blank"}, "粤ICP备11013283123号")
	                            )
	                        ), 
	                        React.createElement("div", {className: "footer-nav f-right"}, 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "关于我们"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/平台介绍.html"}, "平台介绍")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/名词解释.html"}, "名词解释")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/联系我们.html"}, "联系我们")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/服务协议.html"}, "服务协议"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "安全保障"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "项目安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "资金安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "信息安全")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/安全保障.html"}, "账户安全"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col"}, 
	                                React.createElement("h3", null, "帮助中心"), 
	                                React.createElement("ul", null, 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/投资操作指引.html"}, "投资指引")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/融资操作指引.html"}, "融资指引")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "帮助中心/平台公告.html"}, "平台公告")), 
	                                    React.createElement("li", null, React.createElement("a", {href: "javascript:;"}, "常见问题"))
	                                )
	                            ), 
	                            React.createElement("div", {className: "col col-service"}, 
	                                React.createElement("p", null, "客服专线", React.createElement("br", null), "0816-2373017"), 
	                                React.createElement("p", null, "服务时间", React.createElement("br", null), "工作日9:00 - 18:00")
	                            )
	                        ), 
	                        React.createElement("div", {className: "clear"})
	                    )
	                )
	            )
	        )
	    }
	});
	ReactDOM.render(React.createElement(Root, null), document.getElementById('main'));

/***/ },

/***/ 3:
/***/ function(module, exports) {

	var Button = React.createClass({displayName: "Button",
		config:{
	        id:""
	    },
		render: function() {
			var customClassNameArr=this.props.className?this.props.className.split(' '):'';
	        var customClassName ='ucs-btn';
	        if(customClassNameArr.length>0){
	            for(var i=0;i<customClassNameArr.length;i++){
	                customClassName=customClassNameArr[i]+' '+customClassName;
	            }
	        }
			this.props.className = customClassName;
			var id = this.props.id?this.props.id:'';
			if(this.props.href){
				return React.createElement("a", {id: id, onclick: this.props.onclick, className: this.props.className, href: this.props.href}, this.props.value)
			}else{
				return React.createElement("button", {id: id, onclick: this.props.onclick, className: this.props.className}, this.props.value)
			}
		}
	})
	module.exports = Button;

/***/ },

/***/ 4:
/***/ function(module, exports) {

	var Input =  React.createClass({displayName: "Input",
		getDefaultProps:function(){
			return {
				className:'ucs-input',
				dmbind:'',
				placeholder:"",
				onfocus:"",
				onblur:""
			};
		},
		handler:function(){
			console.log('adfdfdf');
		},
		render:function(){
			return React.createElement("input", {type: "text", className: this.props.className, dmbind: this.props.dmbind, placeholder: this.props.placeholder, onfocus: this.props.onfocus, onblur: this.props.onblur})
		}
	})
	module.exports = Input;

/***/ },

/***/ 5:
/***/ function(module, exports, __webpack_require__) {

	/**
	 * Created by Administrator on 2017/3/1.
	 */
	var Label = __webpack_require__(6);

	var FormItem = React.createClass({displayName: "FormItem",
	    getDefaultProps:function(){
	        return{
	            id:"",
	            label:"",
	            dmbind:"",
	            className:"",
	            correctMsg:''
	        }
	    },
	    render:function(){
	        var _udmid = this.props.dmbind;
	        UEventHub.on(_udmid + UI_EVENT_CONST.ONVALIDATE_EVENT,function(msg){
	            var tipNode = this.refs[_udmid],
	                tipInner,
	                _msg = msg;
	            if(!_msg){
	                tipInner = React.createElement("div", null, React.createElement("i", {className: "iconfont icon-correct"}), this.props.correctMsg);
	                tipNode.className = "ucs-form-explain success";
	            }else{
	                tipInner = React.createElement("div", null, React.createElement("i", {className: "iconfont icon-error"}), React.createElement("span", null, _msg));
	                tipNode.className = "ucs-form-explain";
	            }
	            tipNode.innerHTML = tipInner.innerHTML;
	        }.bind(this));
	        return(
	            React.createElement("div", {className: "ucs-form-group " + this.props.className, id: this.props.id}, 
	                React.createElement(Label, {value: this.props.label}), 
	                
	                    this.props.children.map(function(item,idx){
	                        return item;
	                    }), 
	                
	                React.createElement("div", {className: "ucs-form-explain", ref: this.props.dmbind})
	            )
	        )
	    }
	});

	module.exports = FormItem;

/***/ },

/***/ 6:
/***/ function(module, exports) {

	/**
	 * Created by DuHuiling on 2017/2/24.
	 */
	var Label = React.createClass({displayName: "Label",
	    getDefaultProps:function(){
	        return {
	            id:"",
	            setFor:"",
	            value:"这是Label",
	            className:""
	        }
	    },
	    render:function(){
	        return(
	            React.createElement("label", {id: this.props.id, For: this.props.setFor, className: "ucs-label "+this.props.className}, this.props.value)
	        )
	    }
	});
	module.exports = Label;

/***/ },

/***/ 8:
/***/ function(module, exports) {

	var Checkbox = React.createClass({displayName: "Checkbox",
	    getDefaultProps:function(){
	        return{
	            id: "",
	            value: ""
	        }
	    },
	    handler: function (e) {
	        var _input = e.target || e.srcElement,
	            _checked = _input.checked;
	        this.props.onclick && this.props.onclick(_checked);
	    },
	    render: function () {
	        //var checked = props.checked?props.checked:'';
	        var checked = this.props.checked ? true : false;
	        //console.log(typeof(checked));
	        var className = this.props.className ? ('ucs-checkbox-input ' + this.props.className) : 'ucs-checkbox-input';
	        var text = this.props.text ? this.props.text : '';
	        return (
	            React.createElement("label", {className: "ucs-checkbox"}, 
	                React.createElement("input", {type: "checkbox", checked: checked, id: this.props.id, value: this.props.value, className: className, 
	                       onclick: this.handler.bind(this)}), 
	                React.createElement("span", {className: "ucs-checkbox-text"}, text)
	            )
	        )
	    }
	});

	module.exports = Checkbox;




/***/ },

/***/ 25:
/***/ function(module, exports) {

	/**
	 * Created by DuHuiling on 2017/2/24.
	 */
	var closeOpen = function(){
	    var _open = document.getElementsByClassName('open')[0];
	    if(_open){
	        var _classArr = _open.className.split(" ");
	        for(var i in _classArr){
	            if(_classArr[i] == "open"){
	                _classArr.splice(i,1);
	            }
	        }
	        var _className = _classArr.join(" ");
	        _open.className = _className;
	    }
	}
	window.onclick = function(){
	    closeOpen();
	}

	var SelectDropDown = React.createClass({displayName: "SelectDropDown",
	    getDefaultProps: function () {
	        return {
	            id:"",
	            value: "",//默认初始值
	            className: "",
	            type: "", //三种类型，bank,search
	            showNum: "",
	            options: "",
	            defaultValue: "请选择",
	            searchButton: "",
	            placeholder: "",
	            inputChange: "",//搜索时输入框回调
	            buttonClick: ""//搜索时按钮回调
	        }
	    },
	    currentIdx:0,
	    currentValue:0,
	    _toggle:function(ref,e){
	        var tag = this.refs[ref],
	            _this = tag.parentNode;
	        if(e && e.stopPropagation){
	            //因此它支持W3C的stopPropagation()方法
	            e.stopPropagation();
	        }else{
	            //否则我们使用ie的方法来取消事件冒泡
	            window.event.cancelBubble = true;
	        }
	        //closeOpen();
	        _this.className = this._toggleOpen(_this.className);
	    },
	    _toggleOpen: function(_class){
	        var _classList = _class.split(" ");
	        var j = 0;
	        for(var i in _classList){
	            if(_classList[i] == "open"){
	                j = i;
	            }
	        }
	        if(j){
	            _classList.splice(j,1);
	        }else{
	            _classList.push('open');
	        }
	        return _classList.join(" ");
	    },
	    _select:function(curr_node,idx,val,ref){
	        var _node = this.refs[ref],
	            _input = this.refs[ref + '-control'];
	        _node.className = this._toggleOpen(_node.className);
	        _input.innerHTML = curr_node.innerHTML;

	        this.currentIdx = idx;
	        if(val.value){
	            this.currentValue = val.value;
	        }else{
	            this.currentValue = idx;
	        }

	        var _v = this.getCurrentSelect();
	        this.props.onChange ? this.props.onChange(_v) : "";
	    },
	    getCurrentSelect:function(){
	        return {
	            index:this.currentIdx,
	            value:this.currentValue
	        }
	    },
	    render:function(){
	        /*为每个 select-dropdown 创建udmid*/
	        var _page = new UDM({}),
	            _dmid = _page.dmbind;

	        /*判断defaultValue是否是数字，“是”则代表默认显示第几个选项*/
	        var defaultValue = this.props.defaultValue,
	            _dom;
	        if(typeof defaultValue == "number"){
	            _dom = this.props.options[defaultValue].option;
	        }else{
	            _dom = defaultValue;
	        }

	        /*下拉选项列表*/
	        var selectList = function(){
	            var _lis = [],_that = this;
	            for(var i in this.props.options){
	                (function(j,val,ref){
	                    _lis.push(
	                        React.createElement("li", {onclick: 
	                                function(){_that._select(this,j,val,ref)}}, _that.props.options[j].option
	                            
	                        )
	                    );
	                })(i,this.props.options[i],_dmid);
	            }
	            return React.createElement("ul", null, _lis)
	        }.bind(this);

	        return (
	            React.createElement("div", {className: "ucs-select-dropdown "+this.props.className, id: this.props.id, ref: _dmid}, 
	                React.createElement("div", {className: "ucs-select-control", ref: _dmid + '-select-click', onclick: this._toggle.bind(this,_dmid + '-select-click')}, 
	                    React.createElement("div", {className: "ucs-input", ref: _dmid + '-control'}, _dom), 
	                    React.createElement("span", {className: "ucs-icon"})
	                ), 
	                React.createElement("div", {className: "ucs-dropdown"}, 
	                    React.createElement("div", {className: "ucs-dropdown-border"}, 
	                         selectList() 
	                    )
	                )
	            )
	        )
	    }
	});
	module.exports = SelectDropDown;

/***/ }

/******/ });